<script lang="ts" setup>
import { buildStyles, getSize } from "../utils";

interface NumberProps {
  placeholder?: string;
  inputStyles?: any;
  defaultValue?: number;
  width?: string | number;
}

const props = withDefaults(defineProps<NumberProps>(), {
  placeholder: "请输入内容...",
});

const styles = buildStyles(() => {
  return {
    width: getSize(props.width),
  };
});
</script>

<template>
  <div class="umrp-input-number">
    <input type="number" class="input" :style="styles" :placeholder="placeholder" :value="defaultValue" />
  </div>
</template>

<style lang="scss" scoped>
@use "common";
</style>
